package graduationorder.graduationorder.config;

import graduationorder.graduationorder.Interceptor.UserLoginAuthInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Mzk
 * @version 1.0
 * @description: 登录拦截器
 * @date 2024/8/3 下午 5:00
 */
//@Configuration
public class WebConfig implements WebMvcConfigurer {
    //@Autowired
    private UserLoginAuthInterceptor authInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/login");
    }
}
